package com.zmn.plat.persistence.interfaces.part;

import com.zmn.plat.model.entity.part.PartCategoryMap;
import com.zmn.plat.model.entity.part.PartCategoryMapQuery;
import com.zmn.plat.model.vo.part.PartCategoryMapVO;

import java.util.List;

/**
 * 类描述： PartCategoryMapDAO
 *
 * @author DaiZhichao
 * @since 2018/10/23 16:15
 */
public interface PartCategoryMapDAO {

    /**
     * 描述: 根据 id 查询单条数据
     *
     * @param mapId Integer
     * @return PartCategoryMapVO
     * @author DaiZhichao
     * @since 2018/12/13 14:13
     */
    PartCategoryMapVO findVOByKey(Integer mapId);

    /**
     * 描述: 根据 query 查询多条数据并分页
     *
     * @param query PartCategoryMap
     * @return List<PartCategoryMapVO>
     * @author DaiZhichao
     * @since 2018/12/13 14:13
     */
    List<PartCategoryMapVO> listVOPageByQuery(PartCategoryMapQuery query);

    /**
     * 描述: 根据 query 查询总条数
     *
     * @param query PartCategoryMap
     * @return List<PartCategoryMapVO>
     * @author DaiZhichao
     * @since 2018/12/13 14:13
     */
    Integer countByQuery(PartCategoryMapQuery query);

    /**
     * 描述: 根据 ID 修改单条数据
     *
     * @param entity PartCategoryMap
     * @return Integer
     * @author DaiZhichao
     * @since 2018/12/13 14:13
     */
    Integer updateByKey(PartCategoryMap entity);

    /**
     * 描述: 新增单条数据
     *
     * @param entity PartCategoryMap
     * @return Integer
     * @author DaiZhichao
     * @since 2018/12/13 14:13
     */
    Integer insert(PartCategoryMap entity);

    /**
     * 描述: 删除单条数据
     *
     * @param mapId Integer
     * @return Integer
     * @author DaiZhichao
     * @since 2018/12/13 14:13
     */
    Integer deleteByKey(Integer mapId);

    /**
     * 描述: 批量单条数据
     *
     * @param ids List<Integer>
     * @return Integer
     * @author DaiZhichao
     * @since 2018/12/13 14:13
     */
    Integer deleteByKeyBatch(List<Integer> ids);
}
